The complexity of modern integrated circuits and the high cost of fabricating prototypes has led to the development of a class of computer programs that simulate the operation of a circuit. These simulators aid the designer in determining the proper bias voltages to be applied to the various components and in verifying the operation of the circuit before resources are committed to the fabrication of prototypes.
The circuit to be simulated is typically described in terms of a list of nodes and the components connected to each node. The user may actually provide a net list or a graphical representation of the circuit from which the program derives the net list. Each component may be viewed as a device that sources or sinks a current whose amplitude and phase are determined by the voltage at the node to which it is connected, and possibly, by the previous voltages at the node in question. The user may define particular components or utilize a library of standard components provided with the simulation program.
The simulation program finds the set of node voltages that lead to a circuit in which the sum of the currents at each node is zero. This is the voltage at which the currents provided by components that are the source of currents is exactly matched by the currents sinked by the remaining components. Each component is described by a subroutine that provides the current sinked or sourced by the component in response to an input voltage. As will be explained in more detail below, the component subroutines may also provide the first derivatives of the current with respect to the node voltages. In addition, the output of a component subroutine may depend on the history of the node to which the corresponding component is connected. For example, if the component contains inductors or capacitors, than the current will depend on the node voltage and the rate of change of the node voltage with time. The rate of change of the node voltage may be computed from the previous values of the node voltages, i.e., the "history of the nodes".
The simplest type of simulation determines the steady state behavior of the circuit, i.e., its DC operating conditions. Such simulations are particularly useful in setting various bias voltages on key nodes in the circuit. Under steady-state conditions, the solution of the simulation problem typically reduces to the inversion of an N.times.N matrix, where N is the number of nodes in the circuit.
The simulation of the circuit under AC operating conditions is substantially more complex. Typically, the designer wishes to determine the voltage as a function of time at one or more nodes in the circuit when an input node is connected to a voltage source that varies with time. As noted above, one or more of the circuit components will sink or source currents whose amplitude and phase depend on the rate of change of the node voltage as well as the node voltage itself. Hence, the requirement that the currents entering a node are balanced by the currents leaving the node leads to system of differential equations. A circuit having N nodes is now described by an N.times.N system of differential equations.
Numerical methods for solving such systems of differential equations are known. These methods typically require an iterative process at each time point. Each iteration involves the inversion of an N.times.N matrix. Hence, the numerical difficulty of predicting the node voltages at any given time is many times greater than that of a simple DC simulation.
Furthermore, the solution must be repeated at each time point. The spacing of the time points is typically determined by the highest frequency expected at any node having a component connected thereto whose output depends on the rate of change of the node voltage, i.e., the first derivative of the node voltage. The first derivative is determined by fitting the current node voltage and one or previous node voltages to a curve. The slope of the curve is then used as an approximation to the first derivative. If successive time points are too far apart, the approximation will lead to a significant error in the first derivative. It should be noted that such an error is equivalent to making an error in an inductor or capacitor value in the circuit. Hence, simulations of transients will have an error that increase with the time step size. Thus, the required number of steps per second may be an order of magnitude higher than the highest frequency at the most sensitive node.
Consider a simulation in which the input signal to the circuit is a 10 kHz modulation of a 10 gHz microwave signal. To view the circuit response over 10 cycles of the modulation envelop, i.e., one millisecond, with a step size equal to one tenth the period of the carrier, the circuit behavior must be computed at 100 million time points. If the behavior at each of 1000 nodes is to be recovered, the storage space for the results alone becomes a problem.
If the input wave form is periodic, the computational difficulty can be substantially reduced using harmonic balancing methods for computing the behavior of the circuit. In this case, the input signal may be written as a sum of sinusoids having fixed amplitudes. Each circuit component must provide the current sourced or sinked by that component in response to each of the sinusoids at the node connected to the component. If the input signal is represented by 10 sinusoids, the component must provide 10 current values plus the currents at harmonics of these values. It should be noted that each current is a complex number representing the current's amplitude and phase. The currents at the harmonics are needed because a non-linear device may excite one or more harmonics of an input signal. The simulation problem is then reduced to solving a set of non-linear equations in which the currents entering and leaving each node at each frequency are balanced.
The Harmonic Balance technique provides its advantages by eliminating the need to compute solutions at each time point. In this case, the solution of the HN complex non-linear equations provides the steady state solution to the simulation problem. Here, H is the number of harmonics for which each device must provide current data. The difficulty of solving the Harmonic Balance equations, however, limits the method to circuits and waveforms for which the solution of HN non-linear equations can be accomplished.
The traditional approach to solving the Harmonic Balance equations utilizes the Newton-Raphson method for solving non-linear systems of equations. This system requires the solution of an HN by HN matrix which is normally accomplished by LU factorization. This method is not efficient for large systems of equations, since the memory required to factor the matrix rises as O(H.sup.2) and the computational workload rises as O(H.sup.3).
Various relaxation approaches to solving the Harmonic Balance equations have been proposed to reduce the memory requirements. While these methods significantly reduce the amount of memory needed to compute a solution, these method have not gained widespread use because of poor convergence behavior, particularly when the devices at one or more of the nodes are non-linear. In contrast, the Newton-Raphson technique has very rapid convergence near the solution.
Broadly, it is the object of the present invention to provide an improved method for simulating an electronic circuit on a computer.
It is a further object of the present invention to provide a simulator that requires less memory than the Newton-Raphson technique when the current guess is far from the solution.
It is yet another object of the present invention to provide a simulator that imposes a smaller computational workload than the Newton-Raphson method.
These and other objects of the present invention will become apparent to those skilled in the art from the following detailed description of the invention and the accompanying drawings.